package com.tenement.mybatis.dao;

import com.tenement.mybatis.entity.Reserve;

/**
 * 看房预约表
 * 
 * @author wk
 *
 */
public interface ReserveMapper {

	int deleteByPrimaryKey(Integer rId);

	int insert(Reserve record);

	int insertSelective(Reserve record);

	Reserve selectByPrimaryKey(Integer rId);

	int updateByPrimaryKeySelective(Reserve record);

	int updateByPrimaryKey(Reserve record);

	/**
	 * 判断用户是否已经预约该房源
	 * 
	 * @param reserve
	 * @return
	 */
	Reserve judgeIsReserved(Reserve reserve);
	
	/**
	 * 
	 * @param reserve
	 * @return
	 */
	int userReserveHouses(Reserve reserve);
	
}